<!DOCTYPE html>
<html>
  
  <head>
    <meta charset="UTF-8">
    <title>小鱼ADMIN</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="/public/static/css/font.css">
    <link rel="stylesheet" href="/public/static/css/bgadmin.css">
    <script type="text/javascript" src="/public/static/js/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="/public/static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/public/static/js/bgadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <style>
  .layui-input{height:30px;}
  .layui-form-label{line-height: 16px;}
  </style>
  <body>
    <div class="bg-body">
      <?php if($task_id==""){ ?>
	  <div class="layui-row" style="margin-top: -15px;">
        {if condition="($username eq 'admin') OR ($priv['add_visit'] eq 'Y')"}
        <button class="layui-btn layui-btn-small" onclick="bg_admin_show('添加回访','/index.php/crm/Customer/addVisit.html?customer_code={$customer_code}',750,360)"><i class="layui-icon">&#xe608;</i>添加回访</button>
        {/if}
        {if condition="($username eq 'admin') OR ($priv['edit_visit'] eq 'Y')"}
        <button class="layui-btn layui-btn-small" onclick="editVisit();"><i class="layui-icon">&#xe642;</i>编辑回访</button>
        {/if}
        {if condition="($username eq 'admin') OR ($priv['del_visit'] eq 'Y')"}
        <button class="layui-btn layui-btn-small" onclick="delVisit();"><i class="layui-icon">&#xe640;</i>删除回访</button>
        {/if}
      </div>
	  <?php } ?>
      <table class="layui-table" lay-data="{id: 'id', height:280, url:'/index.php/crm/Customer/getVisit', where: {customer_code:'{$customer_code}'}, page:true, limit:5, limits:[5,10,20]}" lay-filter="visit">
        <thead>
        <tr>
          <th lay-data="{checkbox:true, fixed: true}"></th>
          <th lay-data="{field:'id', align:'center', width:80}">编号</th>
          <th lay-data="{field:'create_time', width:150, align:'center'}">回访时间</th>
          <th lay-data="{field:'create_user', width:100, align:'center'}">工号</th>
          <th lay-data="{field:'create_name', width:100, align:'center'}">姓名</th>
          {if condition="($username eq 'admin') OR ($priv['display_phone'] eq 'Y')"}
          <th lay-data="{field:'visit_phone', width:120, align:'center'}">回访号码</th>
          {/if}
          <th lay-data="{field:'visit_type_id', width:100, align:'center'}">回访类型</th>
          <th lay-data="{field:'visit_result_id', width:100, align:'center'}">回访结果</th>
          <th lay-data="{field:'visit_content', width:140, align:'center'}">回访内容</th>
          <th lay-data="{field:'task_id', width:100, align:'center'}">任务编号</th>
        </tr>
        </thead>
      </table>
    </div>

</body>
<script>
    var customer_code = '{$customer_code}';
</script>
<script type="text/javascript" src="/public/static/crm/js/customer/visit.js"></script>
</html>